import service from "./request"

//专业管理
export function majorGetPage(params, page) {
    return service({
        url: '/admin/major/page/' + page,
        method: 'get',
        params: params
    })
}


// 专业页数
export function majorGetPageCount(params) {
    return service({
        url: '/admin/major/page/count',
        method: 'get',
        params: params
    })
}

//专业添加
export function majorAdd(data) {
    return service({
        url: '/admin/major',
        method: 'post',
        data: data
    })
}



export function majorDelete(id) {
    return service({
        url: '/admin/major/' + id,
        method: 'delete'
    })
}


//获取系名
export function departmentName() {
    return service({
        url: '/admin/department/names',
        method: 'get',
    })
}

//根据id获取
export function majorInfo(id) {
    return service({
        url: '/admin/major/' + id,
        method: 'get'
    })
}

//修改信息
export function majorEdit(data) {
    return service({
        url: '/admin/major',
        method: 'put',
        data: data
    })
}